home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-11-06 | 1.2 KB | 62 lines | [TEXT/MPS ] |
- PRINT OFF
- ; ShowIcon.a
-
- ; This is designed to be used with ShowINIT, the utility that displays
- ; icons when an INIT file runs.
-
- ; This code is used to construct another INIT file, which can be placed
- ; in any *existing* INIT file. This new INIT simply finds out
- ; what its ID is, and calls ShowINIT with that ID. By making the
- ; ID of this INIT equal that of the ICN# you want to display, you
- ; can add the ShowINIT feature to any INIT file.
-
- ; Larry Rosenstein
- ; Apple Computer Inc.
-
- INCLUDE 'Traps.a'
- INCLUDE 'ToolEqu.a'
- INCLUDE 'QuickEqu.a'
- INCLUDE 'Defs.a'
- PRINT ON
-
- ShowICON MAIN
-
- stackFrame RECORD {A6Link}
- name: DS.B 256
- theID: DS.W 1
- theTYPE: DS.L 1
- A6Link: DS.L 1
- return: DS.L 1
- theEvent: DS.L 1
- eventMask: DS.W 1
-
- localSize EQU A6Link-name
-
- ENDR
-
-
- WITH stackFrame
-
- IMPORT ShowINIT
-
- LINK A6,#-localSize
-
- MOVE.L A0,-(SP) ; for later _HUnlock
- _HLock ; ourself
-
- MOVE.L (SP),-(SP) ; handle to ourself
- PEA theID(A6)
- PEA theType(A6)
- PEA name(A6)
- _GetResInfo
-
- MOVE.W theID(A6),-(SP)
- MOVE.W #-1,-(SP)
- JSR ShowINIT
-
- MOVE.L (SP)+,A0
- _HUnlock ; as promised
-
- UNLK A6
- RTS
- END